package com.jinyijia.api.rest.v1.vo;

/**
 * @author WX
 * @date 2018/8/22
 **/

import com.jinyijia.api.rest.v1.dto.AndroidShipAddressDTO;
import lombok.Data;

import java.util.List;
/**
 {   "deliverWay": "EXPRESS",
     "address": {
        "id": 4,
        "name": "test",
        "enabled": true,
        "phone": "15165009133",
        "region": "山东省-济宁市-嘉祥县-孟姑集镇",
        "address": "11111111"
     },
    "list": [
               {
                  "shopId": 10,
                   "name": "技术商家测试账号",
                   "commodity": [
                                  {
                                    "title": "test",
                                    "standard": "全网通/4G+128",
                                    "color": "白色",
                                    "count": 1,
                                    "price": 1999,
                                    "thumb": "http://image-jinyijia1688-com.oss-cn-beijing.aliyuncs.com/goods_54aea0b6d39e5f87da2455526f666300.png",
                                    "skuCode": "11-2",
                                    "shopId": 10,
                                    "skuId": 3673
                                   }
            ],
                    "amount": 1999,
                    "freight": 0,
                    "summation": 1999,
                    "totalNum": 1
                }
    ],
    "totalPrice": 1999,
    "totalFreight": 0,
    "totalCount": 1,
    "payable": 1999
 }
 */

/**
 * 此类是接收android前台传来的数据,所以字段要与前台传来的字段一致
 */
/**
 * @author yangrd
 * @version 2.0.0
 * @date 2018/10/6
 **/
@Data
public class OrderSubmitDTO {
    /**
     * 商铺信息
     */
    private List<ShopInfoVo> list;
    /**
     * 收货地址
     */
    private AndroidShipAddressDTO address;
    /**
     * 物流方式
     */
    private String deliverWay;
    /**
     * 订单提交来源
     */
    private OriginEnum origin;

    {
        origin = OriginEnum.SHOPPING_CART;
    }

    public enum  OriginEnum{
        /**
         * 立即购买
         */
        BUY_NOW,

        /**
         * 购物车
         */
        SHOPPING_CART

    }
}
